{include file='public/header'}
<style type="text/css">
.kong1{height:35px;display:block;margin-top:60px}
.simg1{position:relative;width:49%;margin-left:1%;height:105px;float:left;z-index:10;margin-bottom:10px}
.simg1 .img2{width:50px;height:50px;border-radius:4px;z-index:20;float:right;margin-right:10px}
.simg1 p{font-size:1rem;color:#fff;text-align:right;font-weight:700}
.simg1 .p1{text-align:right}
.simg1 p img{width:40px}
.simg1 .big{width:90%;margin:0 auto;background:rgba(255,255,255,.2);border:2px solid #8b848e;border-radius:8px;padding:15px 0}
.simg1 .big .left{float:left;margin-left:10px}
.footer1 .p1{margin-top:1px;font-weight:700}
#wrapper{width:100%;position:absolute;left:0;top:120px;overflow:hidden;z-index:1;-ms-touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;-o-text-size-adjust:none;text-size-adjust:none;height:300px}
.pull-loading{text-align:center;height:40px;line-height:40px;display:flex;align-items:center;justify-content:center;color:#fff}
.w_section3 .w_3{padding-top:0!important}
.w_section3 .w_3 .a1 .p2{font-size:14px}
.w_section3 .w_3 ul li{
  border-bottom:none;
}
.kuangg_section2 .list .a2{max-width:92%;}
</style>
<body style="">
<div class="bg_fixed_v10_2"></div>
<div class="sectionY sectionY_tttt" >
    <p class="p1" style="color: #fff">
        <span class="ppp_title">矿机</span>
    </p>
</div>
	<div class="kong1" style="margin-top: 25px"></div>
<style>
    .kuangg_section1_1{
        background: #122b6c;
    }
    .kuangg_section1_1 li{
        float: left;
        width: 33.1%;
        border-right: 1px solid #04c5f0;
        text-align: center;
        color: #fff;
        padding: 10px 0px;
    }
    .kuangg_section1_1 li:last-child{
        border-right: none;
    }
    .kuangg_section1_1 li.select{
        background: #0b7aad;
        border-color: #0b7aad;
    }
    .w_3 ul{
      padding:10px
    }
</style>
<div class="kuangg_section1">
    <div class="container">
        <div class="kuangg_section1_1 clearfix">
            <ul>

                <li onclick="javascript:location.href='{:url("Index/ourshop")}';" >
                    <span class="s1">矿机列表</span>
                </li>

                <li class="select" onclick="javascript:location.href='{:url("Index/myshop")}';" >
                    <span class="s1">我的矿机</span>
                </li>
                <li onclick="javascript:location.href='{:url("Index/endshop")}';" >
                    <span class="s1">过期矿机</span>
                </li>
            </ul>
        </div>
    </div>
</div>



{if condition="$list eq ''" }
<div class="w_section5">
    <div class="container2">
        <p class="p1">暂无矿机</p>
    </div>
</div>
{else /}
<div class="kuangg_section2">
  <div class="w_section3" id='wrapper' style="overflow: hidden; height: 452px; top: 120px;">
      <div class="w_3" id="scroller">
          <ul>
              {volist name="list" id="item"}
              <div class="list clearfix">
                  <div class="a1">
                      <img src="{$item.img_url}" alt="{$item.title}">
                  </div>
                  <div class="a2">
                      <p class="p1">{$item.title}</p>
                      <p class="p2">购买价格：{$item.price} BOT</p>
                      <p class="p2">运行周期：{$item.daynum}天*{$item.dayearn} BOT</p>
                      <p class="p2">预计总收益：<?php echo ($item['daynum']*$item['dayearn']); ?> BOT</p>
                      <p class='p2'>已产收益：{$item.useearn} BOT</p>
                  </div>
              </div>
              {/volist}
          </ul>
          <div class="pull-loading">上拉加载</div>
      </div>

  </div>
</div>
{/if}
{include file="public/newfoot"}
</body>
<script type="text/javascript">
    $(function(){
        var dd = $("#wrapper").offset().top;
        $("#wrapper").css("height",($(window).height()-dd-100));
        $("#wrapper").css("top",dd);
    })
</script>
<script>
	$(function(){
		var d = $(window).height()-46-44;
		$(".zu_section2").css("height",d);
		$(".show_btn").click(function(){
			$(".big_img").show(200);
		})
		$(".big_img").click(function(){
			$(".big_img").hide(200);
		})
	})

$(function(){
  $('.simg1').click(function(){
      var url = $(this).data('url');
      if(url){
        location.href = url;
      }else{
          layer.alert('等待开放',{title:'程序提示',shade:0.8});
      }
    return false;
  });
})
</script>
<script>
    $(".kuangg_section1_1 li").click(function(){
        $(this).addClass("select").siblings().removeClass("select")
    })
    $(".kuangg_section2").css("height",($(window).height()-190))
</script>
<script type="text/javascript">
    var myscroll = new iScroll("wrapper", {
        onScrollMove: function () { //拉动时
            //上拉加载
            if (this.y < this.maxScrollY) {
                $(".pull-loading").html("释放加载");
                $(".pull-loading").addClass("loading");
            } else {
                $(".pull-loading").html("上拉加载");
                $(".pull-loading").removeClass("loading");
            }
        },
        onScrollEnd: function () { //拉动结束时
            //上拉加载
            if ($(".pull-loading").hasClass('loading')) {
                $(".pull-loading").html("加载中...");
                pullOnLoad();
            }
        }
    });
    //上拉加载函数,ajax
    var num = 1;
    function pullOnLoad() {
        num++;
        $.ajax({
            type:'post',
            url:"{:url('Index/ajaxmyshop')}",
            data:{page:num},
            cache:false,
            dataType:'JSON',
            success:function(data){
                //console.log(data);return;
                if(data.length<=0){
                    $('.pull-loading').html("已加载全部");
                }else{
                    var html = '';
                     for(var i=0;i<data.length;i++){
                         html += '<div class="list clearfix">';
                         html += '<div class="a1">';
                         html += '   <img src="'+data[i]['img_url']+'">';
                         html += '</div>';
                         html += '<div class="a2">';
                         html += '<p class="p1" >'+data[i]['title']+' </p>';
                         html += '<p class="p2" >购买价格：'+data[i]['price']+' BOT </p>';
                         html += '<p class="p2" >运行周期：'+data[i]['daynum']+"*"+data[i]['dayearn']+'BOT </p>';
                         html += '<p class="p2" >预计总收益：'+data[i]['gitbot']+' BOT</p>';
                         html += '<p class="p2" >已产收益：'+data[i]['useearn']+' BOT</p>';
                         html += '        		</div>';
                         html += '        		</div>';
                     }
                    $("#scroller ul").append(html);
                    $('.pull-loading').html("上拉加载");
                }
                myscroll.refresh();
            }
        });
    }
    pullOnLoad();
</script>

</html>
